package com.heima.admin.controller.v1;

import com.heima.apis.wemedia.IWemediaClient;
import com.heima.model.common.dtos.ResponseResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * ClassName: WmChannelController
 * Description:
 * date: 2023/8/28 0028 18:46
 *
 * @author zHan
 */
@RestController
@Slf4j
@RequestMapping("/api/v1/channel")
@Api(tags = "自媒体频道相关接口")
public class WmChannelController {

    @Autowired
    private IWemediaClient wemediaClient;

    /**
     * 查询所有频道
     *
     * @return
     */
    @GetMapping("/channels")
    @ApiOperation("查询所有频道")
    public ResponseResult findAll() {
        return wemediaClient.getChannels();
    }
}